<template>
  <div class="list-check-wrapper-class">
    <div class="tab-class">
      <div class="first-tab" :class="{'tab-active': !hasDone}" @click="changeStatus(false)">未审核</div>
      <div class="second-tab" :class="{'tab-active': hasDone}" @click="changeStatus(true)">已审核</div>
    </div>
    <el-table :height="tableHeight" :data="myTableData" border style="width: 100%">
      <el-table-column label="序号" type="index" width="96" align="center"></el-table-column>
      <el-table-column label="项目名称" prop="projectName" min-width="120" align="center"></el-table-column>
      <el-table-column label="发起人" prop="createUserName" width="140" align="center"></el-table-column>
      <el-table-column label="发起时间" prop="createTime" width="200" align="center"></el-table-column>
      <el-table-column label="审核人" prop="taskOwnerName" width="140" align="center"></el-table-column>
      <el-table-column prop="stepName" v-if="!hasDone" label="当前流程" width="140" align="center"></el-table-column>
      <el-table-column v-if="!hasDone" label="操作" align="center" width="100">
        <template slot-scope="scope">
          <el-button @click="openApprovalDialog(scope.row.projectId, scope.row.taskId, scope.row.processId)" type="text" size="small">审核</el-button>
        </template>
      </el-table-column>
      <el-table-column v-if="hasDone" label="审核详情" prop="projectRemark"  min-width="160" align="center"></el-table-column>
    </el-table>
    <el-pagination
      @size-change="sizeChangeHandle"
      @current-change="currentChangeHandle"
      :current-page="myPageConfig.pageIndex"
      :page-sizes="[10, 20, 50, 100]"
      :page-size="myPageConfig.pageSize"
      :total="myPageConfig.totalPage"
      layout="total, sizes, prev, pager, next, jumper">
    </el-pagination>
    <el-dialog center title="项目评估模型" :fullscreen="true" :visible.sync="approvalDialog">
      <div class="form-wrapper">
        <el-button type="info" class="back-btn" icon="el-icon-back" circle @click="approvalDialog = false;"></el-button>
        <div class="status-line">
          <el-steps :active="projectstore.project.status -1" style="margin: 0 auto;">
            <el-step style="cursor: pointer;" title="立项" ></el-step>
            <el-step style="cursor: pointer;" title="内容审核"></el-step>
            <el-step style="cursor: pointer;" title="项目开启"></el-step>
            <el-step style="cursor: pointer;" title="项目完成"></el-step>
            <el-step style="cursor: pointer;" title="质量评分"></el-step>
            <el-step style="cursor: pointer;" title="时间评估"></el-step>
            <el-step style="cursor: pointer;" title="评估终审"></el-step>
          </el-steps>
        </div>
        <el-form ref="form" :model="projectstore" label-width="200px">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目名称">
                <el-input disabled v-model="projectstore.project.name"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目发起人">
                <el-input disabled v-model="projectstore.project.createUserName"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目等级">
                <el-select disabled v-model="projectstore.project.level">
                  <el-option label="零级" :value="0"></el-option>
                  <el-option label="一级" :value="1"></el-option>
                  <el-option label="二级" :value="2"></el-option>
                  <el-option label="三级" :value="3"></el-option>
                  <el-option label="四级" :value="4"></el-option>
                  <el-option label="五级" :value="5"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="所属部门">
                <el-select disabled v-model="projectstore.project.departmentId">
                  <el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目奖金">
                <template slot="label">
                  <el-tooltip placement="bottom" effect="light">
                    <div slot="content">
                      <p><span class="list-special-tip">项目级别</span><span class="list-special-tip">难度级别</span><span class="list-special-tip">电子开发</span><span class="list-special-tip">嵌入式开发</span><span class="list-special-tip">软件开发</span><span class="list-special-tip">结构开发</span></p>
                      <p v-for="item in awardList" :key="item.level"><span class="list-special-tip">{{item.name}}</span><span class="list-special-tip">{{item.level}}</span><span class="list-special-tip">{{item.data1}}</span><span class="list-special-tip">{{item.data2}}</span><span class="list-special-tip">{{item.data3}}</span><span class="list-special-tip">{{item.data4}}</span></p>
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">项目奖金<i class="el-icon-question"></i></div>
                  </el-tooltip>
                </template>
                <el-input disabled v-model="projectstore.project.totalBonus"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目积分">
                <template slot="label">
                  <el-tooltip placement="bottom" effect="light">
                    <div slot="content">
                      <p><span class="list-special-tip">项目级别</span><span class="list-special-tip">难度级别</span><span class="list-special-tip">电子开发</span><span class="list-special-tip">嵌入式开发</span><span class="list-special-tip">软件开发</span><span class="list-special-tip">结构开发</span></p>
                      <p v-for="item in awardList2" :key="item.level"><span class="list-special-tip">{{item.name}}</span><span class="list-special-tip">{{item.level}}</span><span class="list-special-tip">{{item.data1}}</span><span class="list-special-tip">{{item.data2}}</span><span class="list-special-tip">{{item.data3}}</span><span class="list-special-tip">{{item.data4}}</span></p>
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">项目积分<i class="el-icon-question"></i></div>
                  </el-tooltip>
                </template>
                <el-input disabled v-model="projectstore.project.totalPoints"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="计划开始时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.planStartTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="计划完成时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.planEndTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="实际开始时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.startTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="实际完成时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.endTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item style="font-weight: bold;" label="项目参与人员">
            <el-table :data="projectstore.members" border style="width: 100%; margin-top:10px;font-weight: normal;">
              <el-table-column label="成员名称" prop="kpiItemKey" min-width="180" align="center">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.dingName}}<i v-if="scope.row.manager" class="el-icon-user-solid" style="margin-left:10px;"></i></div>
                </template>
              </el-table-column>
              <el-table-column label="奖励占比" prop="percent" min-width="180" align="center">
                <template slot-scope="scope">
                   <span>{{scope.row.percent}}</span> %
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" label="项目简介">
            <el-input disabled type="textarea" :autosize="{ minRows: 4}" v-model="projectstore.project.remark"></el-input>
          </el-form-item>
          <el-form-item style="font-weight: bold;" label="考核细则">
            <el-table :data="projectstore.items" border style="width: 100%;font-weight: normal;">
              <el-table-column label="考核名称" prop="evItemName" min-width="180" align="center"></el-table-column>
              <el-table-column label="考核内容描述" min-width="180" align="left" header-align="center">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.evItemContent}}</div>
                </template>
              </el-table-column>
              <el-table-column label="分值倍数" prop="scoresPower" align="center" width="100"></el-table-column>
              <el-table-column label="评分人" align="center" min-width="120">
                <template slot-scope="scope">
                  <span>{{scope.row.scoresGiverNames.join(',')}}</span>
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="changeLog.length > 0" label="项目修改记录">
            <el-table :data="changeLog" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="completeTime" label="日期" min-width="180"> </el-table-column>
              <el-table-column prop="description" label="审核情况" min-width="180">
                <template slot-scope="scope">
                  <span>{{scope.row.taskStatus === '1' ? '已通过': '已拒绝'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="taskOwnerName" min-width="180" label="审核人"></el-table-column>
              <el-table-column prop="projectRemark" min-width="180" label="审核详情"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="ApprovalData1.length > 0" label="立项审核记录">
            <el-table :data="ApprovalData1" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="completeTime" label="日期" min-width="180"> </el-table-column>
              <el-table-column prop="description" label="审核情况" min-width="180">
                <template slot-scope="scope">
                  <span>{{scope.row.taskStatus === '1' ? '已通过': '已拒绝'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="taskOwnerName" min-width="180" label="审核人"></el-table-column>
              <el-table-column prop="projectRemark" min-width="180" label="审核详情"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="ApprovalData2.length > 0" label="内容审核记录">
            <el-table :data="ApprovalData2" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="completeTime" label="日期" min-width="180"> </el-table-column>
              <el-table-column prop="description" label="审核情况" min-width="180">
                <template slot-scope="scope">
                  <span>{{scope.row.taskStatus === '1' ? '已通过': '已拒绝'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="taskOwnerName" min-width="180" label="审核人"></el-table-column>
              <el-table-column prop="projectRemark" min-width="180" label="审核详情"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="ApprovalData3.length > 0" label="项目开启记录">
            <el-table :data="ApprovalData3" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="completeTime" label="日期" min-width="180"> </el-table-column>
              <el-table-column prop="description" label="审核情况" min-width="180">
                <template slot-scope="scope">
                  <span>{{scope.row.taskStatus === '1' ? '已通过': '已拒绝'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="taskOwnerName" min-width="180" label="审核人"></el-table-column>
              <el-table-column prop="projectRemark" min-width="180" label="审核详情"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="ApprovalData4.length > 0" label="项目结束记录">
            <el-table :data="ApprovalData4" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="completeTime" label="日期" min-width="180"> </el-table-column>
              <el-table-column prop="description" label="审核情况" min-width="180">
                <template slot-scope="scope">
                  <span>{{scope.row.taskStatus === '1' ? '已通过': '已拒绝'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="taskOwnerName" min-width="180" label="审核人"></el-table-column>
              <el-table-column prop="projectRemark" min-width="180" label="审核详情"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="projectstore.project.status >= 5" label="质量评分详情">
            <el-table :summary-method="getSummaries" show-summary :data="projectstore.items" border style="width: 100%;font-weight: normal;">
              <el-table-column label="考核名称" prop="evItemName" min-width="180" align="center"></el-table-column>
              <el-table-column label="考核内容描述" min-width="180" align="left" header-align="center">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.evItemContent}}</div>
                </template>
              </el-table-column>
              <el-table-column label="分数" prop="scores" align="center" min-width="80">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.scores === ''? '未评分': scope.row.scores}}</div>
                </template>
                <template slot-scope="scope">
                  <del v-if="scope.row.oldScores">{{scope.row.oldScores}}</del>
                  <span>{{scope.row.scores}}</span>
                  <!--<span v-if="scope.row.scores && projectstore.project.status === 5" style="color:#66b1ff;cursor:pointer;" @click="openReAssessDialog(scope.row)"><i class="el-icon-edit-outline"></i></span>-->
                  <el-tooltip v-if="scope.row.oldScores" placement="bottom" effect="light">
                    <div slot="content">
                      {{scope.row.remark}}
                    </div>
                    <span style="color:#66b1ff;cursor:pointer;"><i class="el-icon-tickets"></i></span>
                  </el-tooltip>
                </template>
              </el-table-column>
              <el-table-column label="评分详情" width="150" align="center">
                <template slot-scope="scope">
                  <p v-for="item in scope.row.scoresGivers" :key="item.id">
                    {{item.scoresGiverName}}({{item.scores ? item.scores + '分' : '未评分'}})
                    <el-tooltip placement="bottom" effect="light">
                      <div slot="content">
                        {{item.remark}}
                      </div>
                      <span style="color:#66b1ff;cursor:pointer;"><i class="el-icon-tickets"></i></span>
                    </el-tooltip>
                  </p>
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="ApprovalData5.length > 0" label="质量评分记录">
            <el-table :data="ApprovalData5" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="completeTime" label="日期" min-width="180"> </el-table-column>
              <el-table-column prop="description" label="审核情况" min-width="180">
                <template slot-scope="scope">
                  <span>{{scope.row.taskStatus === '1' ? '已通过': '已拒绝'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="taskOwnerName" min-width="180" label="审核人"></el-table-column>
              <el-table-column prop="projectRemark" min-width="180" label="审核详情"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item key="item7" style="font-weight: bold;" v-if="projectstore.project.status === 6" label="时间评估详情">
            <el-table :data="evaluateDateShowTable" border style="width: 100%;font-weight: normal;">
              <el-table-column min-width="120" prop="name" align="center" label="名称">
                <template slot-scope="scope">
                  <el-tooltip v-if="scope.row.name === '时间评分'" placement="bottom" effect="light">
                    <div slot="content">
                      <p><span class="list-special-tip">逾期得分表</span><span class="list-special-tip">一级</span><span class="list-special-tip">二级</span><span class="list-special-tip">三级</span><span class="list-special-tip">四级</span><span class="list-special-tip">五级</span><span class="list-special-tip">对应项目金</span><span class="list-special-tip">对应积分值</span></p>
                      <p v-for="item in awardList3" :key="item.level"><span class="list-special-tip">{{item.name}}</span><span class="list-special-tip">{{item.data1}}</span><span class="list-special-tip">{{item.data2}}</span><span class="list-special-tip">{{item.data3}}</span><span class="list-special-tip">{{item.data4}}</span><span class="list-special-tip">{{item.data5}}</span><span class="list-special-tip">{{item.data6}}</span><span class="list-special-tip">{{item.data7}}</span></p>
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">时间评分<i class="el-icon-question"></i></div>
                  </el-tooltip>
                  <el-tooltip v-if="scope.row.name === '最终评分'" placement="bottom" effect="light">
                    <div slot="content">
                      最终奖励取质量得分比和时间得分比最低值
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">最终评分<i class="el-icon-question"></i></div>
                  </el-tooltip>
                  <span v-if="scope.row.name === '质量评分'">质量评分</span>
                </template>
              </el-table-column>
              <el-table-column min-width="120" align="center" label="奖金">
                <template slot-scope="scope">
                  <span v-if="!scope.row.edit">{{scope.row.percentBonus}}</span>
                  <el-input v-if="scope.row.edit" style="width:60px;" @input="valueChange" v-model="scope.row.percentBonus"></el-input> %
                </template>
              </el-table-column>
              <el-table-column min-width="160" align="center" label="积分">
                <template slot-scope="scope">
                  <span v-if="!scope.row.edit">{{scope.row.percentPoints}}</span>
                  <el-input v-if="scope.row.edit" style="width:60px;" @input="valueChange" v-model="scope.row.percentPoints"></el-input> %
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item key="item2" style="font-weight: bold;" v-if="projectstore.project.status === 6" label="最终奖金明细">
            <el-table :data="finalAward" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="dingName" align="center" label="姓名" min-width="120"> </el-table-column>
              <el-table-column prop="orinBonus" align="center" label="原始项目金" min-width="120"></el-table-column>
              <el-table-column prop="projectBonusPercent" align="center" min-width="120" label="项目金得分">
                <template slot-scope="scope">
                  {{scope.row.projectBonusPercent}}%
                </template>
              </el-table-column>
              <el-table-column prop="finalBonus" align="center" min-width="120" label="实际项目金"></el-table-column>
              <el-table-column prop="orinPoints" align="center" min-width="120" label="原始积分"></el-table-column>
              <el-table-column prop="projectPointsPercent" align="center" min-width="120" label="积分得分">
                <template slot-scope="scope">
                  {{scope.row.projectPointsPercent}}%
                </template>
              </el-table-column>
              <el-table-column prop="finalPoints" align="center" min-width="120" label="实际积分"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item key="item8" style="font-weight: bold;" v-if="projectstore.project.status === 7" label="时间评估详情">
            <el-table :data="evaluateDateShowTable" border style="width: 100%;font-weight: normal;">
              <el-table-column min-width="120" prop="name" align="center" label="名称">
                <template slot-scope="scope">
                  <el-tooltip v-if="scope.row.name === '时间评分'" placement="bottom" effect="light">
                    <div slot="content">
                      <p><span class="list-special-tip">逾期得分表</span><span class="list-special-tip">一级</span><span class="list-special-tip">二级</span><span class="list-special-tip">三级</span><span class="list-special-tip">四级</span><span class="list-special-tip">五级</span><span class="list-special-tip">对应项目金</span><span class="list-special-tip">对应积分值</span></p>
                      <p v-for="item in awardList3" :key="item.level"><span class="list-special-tip">{{item.name}}</span><span class="list-special-tip">{{item.data1}}</span><span class="list-special-tip">{{item.data2}}</span><span class="list-special-tip">{{item.data3}}</span><span class="list-special-tip">{{item.data4}}</span><span class="list-special-tip">{{item.data5}}</span><span class="list-special-tip">{{item.data6}}</span><span class="list-special-tip">{{item.data7}}</span></p>
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">时间评分<i class="el-icon-question"></i></div>
                  </el-tooltip>
                  <el-tooltip v-if="scope.row.name === '最终评分'" placement="bottom" effect="light">
                    <div slot="content">
                      最终奖励取质量得分比和时间得分比最低值
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">最终评分<i class="el-icon-question"></i></div>
                  </el-tooltip>
                  <span v-if="scope.row.name === '质量评分'">质量评分</span>
                </template>
              </el-table-column>
              <el-table-column min-width="120" align="center" label="奖金">
                <template slot-scope="scope">
                  <span>{{scope.row.percentBonus}}</span>%
                </template>
              </el-table-column>
              <el-table-column min-width="160" align="center" label="积分">
                <template slot-scope="scope">
                  <span>{{scope.row.percentPoints}}</span>%
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item key="item6" style="font-weight: bold;" v-if="projectstore.project.status === 7" label="最终奖金明细">
            <el-table :data="projectstore.memberSummary" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="dingName" align="center" label="姓名" min-width="120"> </el-table-column>
              <el-table-column prop="orinBonus" align="center" label="原始项目金" min-width="120"></el-table-column>
              <el-table-column prop="projectBonusPercent" align="center" min-width="120" label="项目金得分">
                <template slot-scope="scope">
                  {{scope.row.projectBonusPercent}}%
                </template>
              </el-table-column>
              <el-table-column prop="finalBonus" align="center" min-width="120" label="实际项目金"></el-table-column>
              <el-table-column prop="orinPoints" align="center" min-width="120" label="原始积分"></el-table-column>
              <el-table-column prop="projectPointsPercent" align="center" min-width="120" label="积分得分">
                <template slot-scope="scope">
                  {{scope.row.projectPointsPercent}}%
                </template>
              </el-table-column>
              <el-table-column prop="finalPoints" align="center" min-width="120" label="实际积分"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="ApprovalData6.length > 0" label="时间评估记录">
            <el-table :data="ApprovalData6" border style="width: 100%;font-weight: normal;">
              <el-table-column prop="completeTime" label="日期" min-width="180"> </el-table-column>
              <el-table-column prop="description" label="审核情况" min-width="180">
                <template slot-scope="scope">
                  <span>{{scope.row.taskStatus === '1' ? '已通过': '已拒绝'}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="taskOwnerName" min-width="180" label="审核人"></el-table-column>
              <el-table-column prop="projectRemark" min-width="180" label="审核详情"></el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item v-if="projectstore.project.status === 5 && !projectstore.project.qualityScores">
            <el-button type="primary" @click="notice">通知评分人</el-button>
          </el-form-item>
          <el-row :gutter="20">
            <el-col :span="12" v-if="projectstore.project.status === 3">
              <el-form-item style="font-weight: bold;" label="实际开始时间">
                <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" v-model="audit.exData.beginTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12" v-if="projectstore.project.status === 4">
              <el-form-item style="font-weight: bold;" label="实际完成时间">
                <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" v-model="audit.exData.endTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item v-if="!(projectstore.project.status === 5 && !projectstore.project.qualityScores) && (projectstore.project.status !== 3 && projectstore.project.status !== 4)" label="开始审核">
            <el-radio v-model="audit.action" :label="true">通过</el-radio><el-radio v-model="audit.action" :label="false">驳回</el-radio>
          </el-form-item>
          <el-form-item v-if="!(projectstore.project.status === 5 && !projectstore.project.qualityScores)" label="备注">
            <el-input type="textarea" :autosize="{ minRows: 4}" v-model="audit.remark"></el-input>
          </el-form-item>
          <el-form-item v-if="!(projectstore.project.status === 5 && !projectstore.project.qualityScores)">
            <el-button type="primary" v-if="projectstore.project.status !== 6" @click="assess">确定</el-button>
            <el-button type="primary" v-if="projectstore.project.status === 6" @click="approvalDue">确定</el-button>
            <el-button @click="approvalDialog = false;">关闭</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-dialog>
    <el-dialog center title="内容修改审核" :fullscreen="true" :visible.sync="showCheckChange">
      <div class="form-wrapper">
        <el-button type="info" class="back-btn" icon="el-icon-back" circle @click="showCheckChange = false;"></el-button>
        <el-form ref="form" :model="projectstore" label-width="200px">
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目名称">
                <el-input disabled v-model="projectstore.project.name"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目发起人">
                <el-input disabled v-model="projectstore.project.createUserName"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12" v-if="projectstore.project.name !== projectstoreEdit.project.name">
              <el-form-item style="font-weight: bold;" label="项目名称">
                <span slot="label">项目名称<span style="color: red;">(修改后)</span></span>
                <el-input disabled v-model="projectstoreEdit.project.name"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目等级">
                <el-select disabled v-model="projectstore.project.level">
                  <el-option label="零级" :value="0"></el-option>
                  <el-option label="一级" :value="1"></el-option>
                  <el-option label="二级" :value="2"></el-option>
                  <el-option label="三级" :value="3"></el-option>
                  <el-option label="四级" :value="4"></el-option>
                  <el-option label="五级" :value="5"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="所属部门">
                <el-select disabled v-model="projectstore.project.departmentId">
                  <el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12" v-if="projectstore.project.level !== projectstoreEdit.project.level">
              <el-form-item style="font-weight: bold;" label="项目等级">
                <span slot="label">项目等级<span style="color: red;">(修改后)</span></span>
                <el-select disabled v-model="projectstoreEdit.project.level">
                  <el-option label="零级" :value="0"></el-option>
                  <el-option label="一级" :value="1"></el-option>
                  <el-option label="二级" :value="2"></el-option>
                  <el-option label="三级" :value="3"></el-option>
                  <el-option label="四级" :value="4"></el-option>
                  <el-option label="五级" :value="5"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12" v-if="projectstore.project.departmentId !== projectstoreEdit.project.departmentId">
              <el-form-item style="font-weight: bold;" label="所属部门">
                <span slot="label">所属部门<span style="color: red;">(修改后)</span></span>
                <el-select disabled v-model="projectstoreEdit.project.departmentId">
                  <el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目奖金">
                <template slot="label">
                  <el-tooltip placement="bottom" effect="light">
                    <div slot="content">
                      <p><span class="list-special-tip">项目级别</span><span class="list-special-tip">难度级别</span><span class="list-special-tip">电子开发</span><span class="list-special-tip">嵌入式开发</span><span class="list-special-tip">软件开发</span><span class="list-special-tip">结构开发</span></p>
                      <p v-for="item in awardList" :key="item.level"><span class="list-special-tip">{{item.name}}</span><span class="list-special-tip">{{item.level}}</span><span class="list-special-tip">{{item.data1}}</span><span class="list-special-tip">{{item.data2}}</span><span class="list-special-tip">{{item.data3}}</span><span class="list-special-tip">{{item.data4}}</span></p>
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">项目奖金<i class="el-icon-question"></i></div>
                  </el-tooltip>
                </template>
                <el-input disabled v-model="projectstore.project.totalBonus"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="项目积分">
                <template slot="label">
                  <el-tooltip placement="bottom" effect="light">
                    <div slot="content">
                      <p><span class="list-special-tip">项目级别</span><span class="list-special-tip">难度级别</span><span class="list-special-tip">电子开发</span><span class="list-special-tip">嵌入式开发</span><span class="list-special-tip">软件开发</span><span class="list-special-tip">结构开发</span></p>
                      <p v-for="item in awardList2" :key="item.level"><span class="list-special-tip">{{item.name}}</span><span class="list-special-tip">{{item.level}}</span><span class="list-special-tip">{{item.data1}}</span><span class="list-special-tip">{{item.data2}}</span><span class="list-special-tip">{{item.data3}}</span><span class="list-special-tip">{{item.data4}}</span></p>
                    </div>
                    <div style="cursor:pointer;display:inline-block;margin-left:10px;">项目积分<i class="el-icon-question"></i></div>
                  </el-tooltip>
                </template>
                <el-input disabled v-model="projectstore.project.totalPoints"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12" v-if="projectstore.project.totalBonus !== projectstoreEdit.project.totalBonus">
              <el-form-item style="font-weight: bold;" label="项目奖金">
                <span slot="label">项目奖金<span style="color: red;">(修改后)</span></span>
                <el-input disabled v-model="projectstoreEdit.project.totalBonus"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" v-if="projectstore.project.totalPoints !== projectstoreEdit.project.totalPoints">
              <el-form-item style="font-weight: bold;" label="项目积分">
                <span slot="label">项目积分<span style="color: red;">(修改后)</span></span>
                <el-input disabled v-model="projectstoreEdit.project.totalPoints"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="计划开始时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.planStartTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="计划完成时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.planEndTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12" v-if="projectstore.project.planStartTime !== projectstoreEdit.project.planStartTime">
              <el-form-item style="font-weight: bold;" label="计划开始时间">
                <span slot="label">计划开始时间<span style="color: red;">(修改后)</span></span>
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstoreEdit.project.planStartTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12" v-if="projectstore.project.planEndTime !== projectstoreEdit.project.planEndTime">
              <el-form-item style="font-weight: bold;" label="计划完成时间">
                <span slot="label">计划完成时间<span style="color: red;">(修改后)</span></span>
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstoreEdit.project.planEndTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="实际开始时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.startTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item style="font-weight: bold;" label="实际完成时间">
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstore.project.endTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12" v-if="projectstore.project.startTime !== projectstoreEdit.project.startTime">
              <el-form-item style="font-weight: bold;" label="实际开始时间">
                <span slot="label">实际开始时间<span style="color: red;">(修改后)</span></span>
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstoreEdit.project.startTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="12" v-if="projectstore.project.endTime !== projectstoreEdit.project.endTime">
              <el-form-item style="font-weight: bold;" label="实际完成时间">
                <span slot="label">实际完成时间<span style="color: red;">(修改后)</span></span>
                <el-date-picker disabled type="date" placeholder="选择日期" v-model="projectstoreEdit.project.endTime" style="width: 100%;"></el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item style="font-weight: bold;" label="项目参与人员">
            <el-table :data="projectstore.members" border style="width: 100%; margin-top:10px;font-weight: normal;">
              <el-table-column label="成员名称" prop="kpiItemKey" min-width="180" align="center">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.dingName}}<i v-if="scope.row.manager" class="el-icon-user-solid" style="margin-left:10px;"></i></div>
                </template>
              </el-table-column>
              <el-table-column label="奖励占比" prop="percent" min-width="180" align="center">
                <template slot-scope="scope">
                   <span>{{scope.row.percent}}</span> %
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" label="项目参与人员" v-if="JSON.stringify(projectstore.members) !== JSON.stringify(projectstoreEdit.members)">
            <span slot="label">项目参与人员<span style="color: red;">(修改后)</span></span>
            <el-table :data="projectstoreEdit.members" border style="width: 100%; margin-top:10px;font-weight: normal;">
              <el-table-column label="成员名称" prop="kpiItemKey" min-width="180" align="center">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.dingName}}<i v-if="scope.row.manager" class="el-icon-user-solid" style="margin-left:10px;"></i></div>
                </template>
              </el-table-column>
              <el-table-column label="奖励占比" prop="percent" min-width="180" align="center">
                <template slot-scope="scope">
                   <span>{{scope.row.percent}}</span> %
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item style="font-weight: bold;" label="项目简介">
            <el-input disabled type="textarea" :autosize="{ minRows: 4}" v-model="projectstore.project.remark"></el-input>
          </el-form-item>
          <el-form-item style="font-weight: bold;" v-if="projectstore.project.remark !== projectstoreEdit.project.remark" label="项目简介">
            <span slot="label">项目简介<span style="color: red;">(修改后)</span></span>
            <el-input disabled type="textarea" :autosize="{ minRows: 4}" v-model="projectstoreEdit.project.remark"></el-input>
          </el-form-item>
          <el-form-item style="font-weight: bold;" label="考核细则">
            <el-table :data="projectstore.items" border style="width: 100%;font-weight: normal;">
              <el-table-column label="考核名称" prop="evItemName" min-width="180" align="center"></el-table-column>
              <el-table-column label="考核内容描述" min-width="180" align="left" header-align="center">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.evItemContent}}</div>
                </template>
              </el-table-column>
              <el-table-column label="分值倍数" prop="scoresPower" align="center" width="100"></el-table-column>
              <el-table-column label="评分人" align="center" min-width="120">
                <template slot-scope="scope">
                  <span>{{scope.row.scoresGiverNames.join(',')}}</span>
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
           <el-form-item style="font-weight: bold;" label="考核细则" v-if="JSON.stringify(projectstore.items) !== JSON.stringify(projectstoreEdit.items)">
             <span slot="label">考核细则<span style="color: red;">(修改后)</span></span>
            <el-table :data="projectstoreEdit.items" border style="width: 100%;font-weight: normal;">
              <el-table-column label="考核名称" prop="evItemName" min-width="180" align="center"></el-table-column>
              <el-table-column label="考核内容描述" min-width="180" align="left" header-align="center">
                <template slot-scope="scope">
                  <div style="white-space: pre-line;">{{scope.row.evItemContent}}</div>
                </template>
              </el-table-column>
              <el-table-column label="分值倍数" prop="scoresPower" align="center" width="100"></el-table-column>
              <el-table-column label="评分人" align="center" min-width="120">
                <template slot-scope="scope">
                  <span>{{scope.row.scoresGiverNames.join(',')}}</span>
                </template>
              </el-table-column>
            </el-table>
          </el-form-item>
          <el-form-item label="开始审核">
            <el-radio v-model="audit.action" :label="true">通过</el-radio><el-radio v-model="audit.action" :label="false">驳回</el-radio>
            <el-input type="textarea" :autosize="{ minRows: 4}" v-model="audit.remark"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="assess">确定</el-button>
            <el-button @click="showCheckChange = false;">关闭</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-dialog>
    <el-dialog title="评分窗口" :visible.sync="reAssessDialog" width="600px">
      <el-form :model="scoreForm" style="padding-right:100px;" label-width="120px">
        <el-form-item label="分数：">
          <el-rate :max='10' v-model="scoreForm.scores" style="margin-top:8px;"></el-rate>
        </el-form-item>
        <el-form-item label="评分依据：">
          <el-input type="textarea" :rows="5" placeholder="请输入评分的依据" v-model="scoreForm.remark"></el-input>
        </el-form-item>
        <p class="notice">注：要求评分公正、公平、严谨，评分范围1-10星。如发现有徇私舞弊现象，将追究责任。</p>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="reAssessDialog = false">取 消</el-button>
        <el-button type="primary" @click="reAssess">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
  import formUtil from '@/utils/formUtil';
  import dingMixin from  '@/mixins/ding'
  import * as dd from 'dingtalk-jsapi'

  export default {
    data() {
      return {
        showCheckChange: false,
        reAssessDialog: false,
        hasDone: false,
        stepMap: {
          '1': '创建项目模型',
          '2': '项目内容审核',
          '3': '项目质量评分',
          '4': '项目时间评估',
          '5': '项目成绩审核',
          '6': '公布',
        },
        scoreForm: {
          scores: 1,
          remark: '',
          paperDetailId: ''
        },
        myTableData: [],
        departments: [],
        ApprovalData1: [],
        ApprovalData2: [],
        ApprovalData3: [],
        ApprovalData4: [],
        ApprovalData5: [],
        ApprovalData6: [],
        ApprovalData7: [],
        evaluateDateShowTable: [],
        approvalDialog: false,
        audit: {
          processId: '',
          taskId: '',
          action: true,
          remark: '',
          exData: {
            beginTime: '',
            endTime: ''
          }
        },
        finalAward: [],
        myPageConfig:{
          pageIndex: 1,
          pageSize: 10,
          totalPage: 0
        },
        projectstore: {
          items: [],
          members: [],
          memberSummary: [],
          project: {
            createTime: '',
            departmentId: '',
            departmentName: '',
            endTime: '',
            id: '',
            initialor: '',
            initialorName: '',
            level: '',
            name: '',
            planEndTime: '',
            planStartTime: '',
            qualityScores: '',
            remark: '',
            startTime: '',
            totalBonus: '',
            totalPoints: '',
            status: ''
          }
        },
        projectstoreEdit: {
          items: [],
          members: [],
          memberSummary: [],
          project: {
            createTime: '',
            departmentId: '',
            departmentName: '',
            endTime: '',
            id: '',
            initialor: '',
            initialorName: '',
            level: '',
            name: '',
            planEndTime: '',
            planStartTime: '',
            qualityScores: '',
            remark: '',
            startTime: '',
            totalBonus: '',
            totalPoints: '',
            status: ''
          }
        },
        changeLog: [],
        threadId: null,
        tableHeight: window.tableHeight,
        awardList:[{
          name: '技术任务',
          level: 0,
          data1: '200-500',
          data2: '200-500',
          data3: '200-500',
          data4: '100-300',
        },{
          name: '变型开发',
          level: 1,
          data1: '800',
          data2: '800',
          data3: '800',
          data4: '400',
        },{
          name: '改进开发',
          level: 2,
          data1: '2000',
          data2: '2000',
          data3: '2000',
          data4: '1000',
        },{
          name: '对标开发',
          level: 3,
          data1: '4000',
          data2: '4000',
          data3: '4000',
          data4: '2000',
        },{
          name: '专项攻关',
          level: 4,
          data1: '6000',
          data2: '6000',
          data3: '6000',
          data4: '3000',
        },{
          name: '高新研发',
          level: 5,
          data1: '8000',
          data2: '8000',
          data3: '8000',
          data4: '4000',
        }],
        awardList2:[{
          name: '技术任务',
          level: 0,
          data1: '2-8',
          data2: '2-8',
          data3: '2-8',
          data4: '2-5',
        },{
          name: '变型开发',
          level: 1,
          data1: '10',
          data2: '10',
          data3: '10',
          data4: '5',
        },{
          name: '改进开发',
          level: 2,
          data1: '15',
          data2: '15',
          data3: '15',
          data4: '10',
        },{
          name: '对标开发',
          level: 3,
          data1: '25',
          data2: '25',
          data3: '25',
          data4: '15',
        },{
          name: '专项攻关',
          level: 4,
          data1: '40',
          data2: '40',
          data3: '40',
          data4: '20',
        },{
          name: '高新研发',
          level: 5,
          data1: '60',
          data2: '60',
          data3: '60',
          data4: '30',
        }],
        awardList3:[{
          name: '一般逾期',
          data1: '≤5%',
          data2: '≤5%',
          data3: '≤8%',
          data4: '≤10%',
          data5: '≤15%',
          data6: '不高于80%',
          data7: '不高于50%'
        },{
          name: '严重逾期',
          data1: '≤15%',
          data2: '≤15%',
          data3: '≤20%',
          data4: '≤25%',
          data5: '≤30%',
          data6: '不高于30%',
          data7: '0'
        },{
          name: '项目事故',
          data1: '>15%',
          data2: '>15%',
          data3: '>20%',
          data4: '>25%',
          data5: '>30%',
          data6: '0',
          data7: '负'
        }]
      };
    },
    activated() {
      this.tableHeight = document.documentElement['clientHeight'] - 250
      window.onresize = () => {
        this.tableHeight = document.documentElement['clientHeight'] - 250
      }
    },
    async mounted() {
      this.departments = await this.$httpN.get('sys/dept/list')
      this.searchList(true);
    },
    mixins: [dingMixin],
    methods: {
      changeStatus(type) {
        if(this.hasDone === type) return;
        this.hasDone = type;
        this.searchList('init');
      },
      sizeChangeHandle (val) {
        this.myPageConfig.pageSize = val
        this.searchList(true)
      },
      currentChangeHandle (val) {
        this.myPageConfig.pageIndex = val
        this.searchList()
      },
      async openApprovalDialog(id, taskId, processId) {
        this.finalAward = [];
        let projectstore = await this.$httpN.postQ('pde/project/detail', {projectId: id}, false);

        projectstore.items.forEach((item) => {
          item.scoresGiverNames = item.scoresGivers.map(user => user.scoresGiverName)
        })

        if(projectstore.project.editLogId) {
          projectstore.project.status = 1;
          projectstore.members.forEach((item) => {
            item.orinBonus = '';
            item.orinPoints = '';
            item.projectId = '';
            item.id = '';
          })
          projectstore.items.forEach((item) => {
            item.projectId = '';
            item.id = '';
            item.scoresGivers.forEach((giver) => {
              giver.detailId = '';
              giver.id = '';
            })
          })
          this.projectstore = projectstore;
          this.showCheckChange = true;
          let projectstoreEdit = await this.$httpN.postQ('pde/project/editLogDetail', {editLogId: projectstore.project.editLogId});
          projectstoreEdit.items.forEach((item) => {
            item.scoresGiverNames = item.scoresGivers.map(user => user.scoresGiverName)
          })
          projectstoreEdit.members.forEach((item) => {
            item.orinBonus = '';
            item.orinPoints = '';
            item.projectId = '';
            item.id = '';
          })
           projectstoreEdit.items.forEach((item) => {
            item.projectId = '';
            item.id = '';
            item.scoresGivers.forEach((giver) => {
              giver.detailId = '';
              giver.id = '';
            })
          })

          this.projectstoreEdit = projectstoreEdit;
          this.audit.taskId = taskId;
          this.audit.processId = processId;
          this.audit.action = true;
          this.audit.remark = '';
          this.audit.exData = {
            beginTime: '',
            endTime: ''
          }

          return;
        }

        let result = await this.$httpN.postB('pde/project/listAuditTask',{
          'projectId': projectstore.project.id
        })

        let history = result.list;
        this.ApprovalData1 = history.filter(item => item.stepSort === '1' && item.taskStatus !== '0' && item.modelId === '4');
        this.ApprovalData2 = history.filter(item => item.stepSort === '2' && item.taskStatus !== '0' && item.modelId === '4');
        this.ApprovalData3 = history.filter(item => item.stepSort === '3' && item.taskStatus !== '0' && item.modelId === '4');
        this.ApprovalData4 = history.filter(item => item.stepSort === '4' && item.taskStatus !== '0' && item.modelId === '4');
        this.ApprovalData5 = history.filter(item => item.stepSort === '5' && item.taskStatus !== '0' && item.modelId === '4');
        this.ApprovalData6 = history.filter(item => item.stepSort === '6' && item.taskStatus !== '0' && item.modelId === '4');
        this.ApprovalData7 = history.filter(item => item.stepSort === '7' && item.taskStatus !== '0' && item.modelId === '4');
        this.changeLog = history.filter(item => item.stepSort === '1' && item.taskStatus !== '0' && item.modelId === '5');

        let currentTask = history.filter((item) => item.stepSort === (projectstore.project.status + '') && item.taskStatus === '0');
        this.audit.taskId = currentTask[0].taskId;

        if(projectstore.project.status >= 6) {
          let score = projectstore.project.finalScores ? projectstore.project.finalScores:
                         projectstore.project.overDay === '0'? projectstore.project.qualityScores : ''

          this.evaluateDateShowTable = [{
            name: '质量评分',
            percentPoints: score,
            percentBonus: score,
            edit: false
          },{
            name: '时间评分',
            percentPoints: projectstore.project.percentPoints,
            percentBonus: projectstore.project.percentBonus,
            edit: false
          },{
            name: '最终评分',
            percentPoints: score > projectstore.project.percentPoints? projectstore.project.percentPoints: score,
            percentBonus: score > projectstore.project.percentBonus? projectstore.project.percentBonus: score,
            finalScores: score,
            edit: true
          }]
        }
        this.audit.processId = projectstore.project.processId;
        this.audit.action = true;
        this.audit.remark = '';
        this.projectstore = projectstore;
        this.audit.exData = {
          beginTime: '',
          endTime: ''
        }
        if(projectstore.project.status >= 7) this.projectstore.memberSummary = [...this.projectstore.members, this.projectstore.memberSummary];
        this.approvalDialog = true;

        if(projectstore.project.status === 6) this.getAward();
      },
      async searchList(init) {
        if(init) this.myPageConfig.pageIndex = 1;
        let {list, totalCount} = await this.$httpN.postB('pde/project/listAuditTask',{
          'page': this.myPageConfig.pageIndex,
          'done': this.hasDone,
          'limit': this.myPageConfig.pageSize,
          'operatorId': this.userInfo.dingId
        })
        this.myTableData = list;
        this.myPageConfig.totalPage = totalCount;
      },
      async reAssess() {
        if(!await this.$httpN.postQ('pde/scores/editScores', this.scoreForm)) return;
        formUtil.submitSuccess('打分成功');
        this.reAssessDialog = false;
        this.openApprovalDialog(this.projectstore.project.id)
      },
      openReAssessDialog(kpiItem) {
        console.log(kpiItem)
        this.reAssessDialog = true;
        this.scoreForm.scores = (kpiItem.scores / kpiItem.scoresPower);
        this.scoreForm.remark = '';
        this.scoreForm.detailId = kpiItem.id;
      },
      approvalDue() {
        if(this.audit.action) {
          formUtil.submitConfirm('您确定要提交终审了吗?', async ()=> {
            if(!await this.$httpN.postB('pde/project/evaluateDate', {
              id: this.projectstore.project.id,
              finalScores: this.evaluateDateShowTable[2].finalScores,
              percentPoints: this.evaluateDateShowTable[2].percentPoints,
              percentBonus: this.evaluateDateShowTable[2].percentBonus,
            })) return;
            this.assess();
          })
        }else {
          this.assess();
        }
      },
      async assess() {
        if(this.projectstore.project.status === 3 && !this.audit.exData.beginTime) return formUtil.submitError('请选择项目开始时间');
        if(this.projectstore.project.status === 4 && !this.audit.exData.endTime) return formUtil.submitError('请选择项目结束时间');
        if(!await this.$httpN.postB('flow/process/audit', this.audit)) return;
        formUtil.submitSuccess('审核成功');
        this.approvalDialog = false;
        this.showCheckChange = false;
        this.searchList();
      },
      getSummaries(param) {
        const { columns, data } = param;
        const sums = [];
        columns.forEach((column, index) => {
          if (index === 0) {
            sums[index] = '总分';
            return;
          }else if(index === 2) {
            sums[index] = this.projectstore.project.qualityScores;
            return;
          }
        });
        return sums;
      },
      notice() {
        formUtil.submitConfirm('您确定通知未评分人吗?', async ()=> {
          if(!await this.$httpN.postQ('pde/project/noticeScoresGiver', {projectId: this.projectstore.project.id})) return;
          formUtil.submitSuccess('通知成功');
        })
      },
      async getAward() {
        this.finalAward = await this.$httpN.postB('pde/project/calcFinalBonus', {
          id: this.projectstore.project.id,
          finalScores: this.evaluateDateShowTable[2].finalScores,
          percentPoints: this.evaluateDateShowTable[2].percentPoints,
          percentBonus: this.evaluateDateShowTable[2].percentBonus,
        })
      },
      valueChange() {
        if(this.threadId) clearTimeout(this.threadId);
        this.threadId = setTimeout(() => {
          if(this.checkNum(this.evaluateDateShowTable[2].finalScores) && this.checkNum(this.evaluateDateShowTable[2].percentPoints) && this.checkNum(this.evaluateDateShowTable[2].percentBonus)) this.getAward();
          this.threadId = null;
        }, 600)
      },
      checkNum(num) {
        return num !== '' && !isNaN(num)
      }
    }
  };
</script>
<style lang="scss">
  .list-special-tip{
    display: inline-block;
    width:70px;
    text-align: center;
  }
  .list-check-wrapper-class .el-select.el-select--medium{
    width: 100%;
  }

  .list-check-wrapper-class{
    .form-wrapper{
      width: 70%;
      min-width: 1130px;
      margin: 0 auto;
      padding: 70px;
      padding-top: 10px;
      padding-left:0;
      position:relative;
    }
    .status-line{
      height: 90px;
      padding-top: 10px;
      width: 100%;
      margin: 0 auto;
      position: sticky;
      top: 0px;
      z-index: 2;
      background-color: white;
    }
    .tab-class{
      width: 100%;
      border-bottom: 1px solid #e4e7ed;
      font-size:0;
      margin-bottom:-1px;
      div{
        display:inline-block;
        width: 96px;
        line-height:40px;
        border: 1px solid #e4e7ed;
        text-align: center;
        margin-bottom: -1px;
        color:#303133;
        font-size:14px;
        cursor: pointer;
        background:#F5F7FA;
        &:hover{
          color:#409eff;
        }
      }
      .first-tab{
        border-radius: 4px 0 0 0;
        border-right:0;
      }
      .second-tab{
        border-radius: 0 4px 0 0;
      }
      .tab-active{
        color:#409eff;
        border-bottom:1px solid white;
        background: white;
      }
    }
    .notice{
      margin-top:10px;
      color:red;
      padding-left:120px;
    }
    .back-btn{
      position: fixed;
      top: 50px;
      left: 50px;
      z-index: 999;
    }
  }

  @media screen and (max-width:1600px){
    .list-check-wrapper-class .status-line{
      right: 100px;
    }
  }


  @media screen and (max-width:1450px){
    .list-check-wrapper-class .status-line{
      right: 30px;
    }
  }

  .el-step__head.is-process{
    color:#f98911;
    border-color: #f98911;
  }
  .el-step__title.is-process{
    color: #f98911;
  }

  .el-step__head.is-wait{
    color:black;
    border-color: black
  }
  .el-step__title.is-wait{
    color: black;
  }
</style>
